package com.simple.demo.clone;

public class Test {

    public static void main(String[] args) {
        User user = new User();
        user.setId("1001");
        user.setName("bml");
        user.setAddress("四川成都市温江区");
        User user1 = (User) user.clone();
        user1.setAddress("四川成都市成华区");
        System.out.println("user="+user1.toString());
        System.out.println("user1="+user1.toString());
    }
}
